﻿using Model;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using 后整理管理系统.自定义类;
using 纺织贸易管理系统;
using 纺织贸易管理系统.设置窗体;

namespace 后整理管理系统.选择窗体
{
    public partial class 生成单明细选择 : Form
    {
        public List<danjumingxitable> SelectItems = new List<danjumingxitable>();
        public 生成单明细选择(List<danjumingxitable> items)
        {
            InitializeComponent();
            CreateGrid.Create("流转卡", gridView1,"gridView2");
         gridControl1.DataSource=items;
           
        }
 
        private void 配置列ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var fm = new 配置列(gridView1) { formname = this.Name, Obj = new danjumingxitable () };
            fm.ShowDialog();
        }

        private void 保存样式ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            CreateGrid.SaveGridview(this.Name, gridView1);
        }

        private void 入库单选择_FormClosed(object sender, FormClosedEventArgs e)
        {
            SelectItems  = SelectHelper.GetSelectList<danjumingxitable>(gridView1);
            this.Close(); 
        }


        private void gridView1_DoubleClick(object sender, EventArgs e)
        {
            this.Close();
        }

        private void 选择ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
